import React from 'react';
import {Carousel} from 'antd-mobile'
export default function Swipper() {
  let state = {
    data: [1, 2, 3],
  }
  return <div style={{height:'56vw'}}>
    <Carousel
      autoplay={false}
      infinite
    >
        {
          state.data.map(val => {
            return (
              <a
                key={val}
                href="#"
                style={{ display: 'inline-block', width: '100%' }}
              >
                <img
                  src={`${require('@/assets/img/1.jpg')}`}
                  alt=""
                  style={{ width: '100%', verticalAlign: 'top' }}
                  onLoad={() => {
                    // fire window resize event to change height
                    window.dispatchEvent(new Event('resize'));
                  }}
                />
              </a>
            )
          })
        }
    </Carousel>
  </div>;
}
